#include <stdio.h>
#include "arrange.hpp"

int main(int argc, char const *argv[])
{
    std::vector<int> X = {26,85,23,48,16,28,69,36,21};
    std::vector<int> Y = {55,26,87,50,79,22,73,34,47};

    Arrange a;
    a.initNum(X);

    std::vector<int> result = a.getResult(Y);

    int sum = 0;
    for (int i = 0; i < Y.size(); i++) {

        int diff = abs(Y[i] - result[i]);
        sum += diff * diff;
        printf("%02d, ", result[i]);
    }
    printf("\nsum : %d\n", sum);

    return 0;
}
